using B.S.Medical.ErrorCode;
using MediatR;
using System;
using System.Collections.Generic;

namespace B.S.Medical.Api.Read.Application.Command.Payment
{
    /// <summary>
    /// 查询支付成功详情命令
    /// </summary>
    public class GetPaymentSuccessDetailCommand : IRequest<ApiResult<PaymentSuccessDetailDto>>
    {
        /// <summary>
        /// 支付记录ID
        /// </summary>
        public int PaymentId { get; set; }
        
        /// <summary>
        /// 订单号（可选，如果没有PaymentId可以使用订单号查询）
        /// </summary>
        public string OrderNo { get; set; }
    }
    
    /// <summary>
    /// 支付成功详情DTO
    /// </summary>
    public class PaymentSuccessDetailDto
    {
        /// <summary>
        /// 费用类型
        /// </summary>
        public string ItemName { get; set; }
        
        /// <summary>
        /// 就诊科室
        /// </summary>
        public string DepartmentName { get; set; }
        
        /// <summary>
        /// 医生姓名
        /// </summary>
        public string DoctorName { get; set; }
        
        /// <summary>
        /// 就诊人
        /// </summary>
        public string PatientName { get; set; }
        
        /// <summary>
        /// 就诊卡号
        /// </summary>
        public string IdCard { get; set; }
        
        /// <summary>
        /// 费用明细
        /// </summary>
        public List<PaymentSuccessItemDto> ItemDetails { get; set; } = new List<PaymentSuccessItemDto>();
        
        /// <summary>
        /// 支付方式
        /// </summary>
        public string PaymentMethod { get; set; }
        
        /// <summary>
        /// 卡内余额
        /// </summary>
        public decimal CardBalance { get; set; }
        
        /// <summary>
        /// 订单总金额
        /// </summary>
        public decimal OrderAmount { get; set; }
        
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderNo { get; set; }
        
        /// <summary>
        /// 订单时间
        /// </summary>
        public DateTime OrderTime { get; set; }
        
        /// <summary>
        /// 订单状态
        /// </summary>
        public string OrderStatus { get; set; }
    }
    
    /// <summary>
    /// 支付成功明细项DTO
    /// </summary>
    public class PaymentSuccessItemDto
    {
        /// <summary>
        /// 药品/项目名称
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 单价
        /// </summary>
        public decimal UnitPrice { get; set; }
        
        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }
        
        /// <summary>
        /// 金额
        /// </summary>
        public decimal Amount { get; set; }
    }
} 